<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->

<B><A HREF="FFS.html">FFS(3)</A></B>		       FreeBSD Library Functions Manual 		<B><A HREF="FFS.html">FFS(3)</A></B>


</PRE>
<H2>NAME</H2><PRE>
     <B>ffs</B> - find first bit set in a bit string


</PRE>
<H2>SYNOPSIS</H2><PRE>
     <B>#include</B> <B>&lt;string.h&gt;</B>

     <I>int</I>
     <B>ffs</B>(<I>int</I> <I>value</I>)


</PRE>
<H2>DESCRIPTION</H2><PRE>
     The <B>ffs</B>() function finds the first bit set in <I>value</I> and returns the index
     of that bit.  Bits are numbered starting from 1, starting at the right-
     most bit.	A return value of 0 means that the argument was zero.


</PRE>
<H2>SEE ALSO</H2><PRE>
     <B><A HREF="bitstring.html">bitstring(3)</A></B>


</PRE>
<H2>HISTORY</H2><PRE>
     The <B>ffs</B>() function appeared in 4.3BSD.

BSD				April 19, 1994				     1
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
